import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while(in.hasNextInt()){
            int count = 0;
            int size = in.nextInt();
            int[] arr = new int[size];
            for (int i = 0; i < size; i++) {
                arr[i] = in.nextInt();
            }
            int target = in.nextInt();
            for (int i = 0; i < size; i++) {
                if(arr[i] == target){
                    count++;
                }
            }
            System.out.println(count);
        }
    }
}
